package is.ru.honn.rupin.data;

import is.ru.honn.rupin.domain.Follower;
import is.ru.honn.rupin.domain.User;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * A class which maps the columns of the table to variables in Follower POJO
 */
public class FollowerRowMapper implements RowMapper {

    @Override
    public Object mapRow(ResultSet resultSet, int i) throws SQLException {
        Follower follower = new Follower(
                resultSet.getString(1),
                resultSet.getString(2)
        );
        return follower;
    }
}
